package cn.stylefeng.guns.dao.mapper.yaode;

import cn.stylefeng.guns.dao.entity.yaode.GaiaSdSaleD;
import cn.stylefeng.guns.dao.entity.yaode.SaleStockOriginal;
import cn.stylefeng.guns.dao.entity.yaode.StoreOriginal;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author quspacedraon
 * @since 2024-02-18
 */
@DS("yaode_sqlserver")
public interface GaiaSdSaleDMapper extends BaseMapper<GaiaSdSaleD> {

    List<SaleStockOriginal> getSaleStock(@Param("time") String time);

    List<StoreOriginal> getStoreList();

    /**
     * 采购数量
     *
     * @param time
     * @return
     */
    Integer getPurchaseAmount(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 销售数量
     *
     * @param time
     * @return
     */
    Integer getSaleAmount(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 批发销售数量
     *
     * @param time
     * @return
     */
    Long getWholesaleSalesAmount(@Param("startTime") String startTime, @Param("endTime") String endTime);


}
